//
// Created by Castle on 2025/10/28.
//

#include <iostream>
using namespace std;

int main() {
    int int_data {45};
    double double_data{5.5};

    // Reference
    int& ref_int_data{int_data};
    double& ref_double_data {double_data};

    // print stuff out
    cout << "int_data = " << int_data << endl;
    cout << "&int_data = " << &int_data << endl;
    cout << "double_data = " << double_data << endl;
    cout << "&double_data = " <<&double_data << endl;

    cout << "--------------" << endl;

    cout << "ref_int_data = " << ref_int_data << endl;
    cout << "&ref_int_data = " << &ref_int_data << endl;
    cout << "ref_double_data = " << ref_double_data << endl;
    cout << "&ref_double_data = " << &ref_double_data << endl;

    int_data = 111;
    double_data = 45.33;
    cout << "--------------" << endl;

    // print stuff out
    cout << "int_data = " << int_data << endl;
    cout << "&int_data = " << &int_data << endl;
    cout << "double_data = " << double_data << endl;
    cout << "&double_data = " <<&double_data << endl;

    cout << "--------------" << endl;

    cout << "ref_int_data = " << ref_int_data << endl;
    cout << "&ref_int_data = " << &ref_int_data << endl;
    cout << "ref_double_data = " << ref_double_data << endl;
    cout << "&ref_double_data = " << &ref_double_data << endl;

    return 0;
}